home *** CD-ROM | disk | FTP | other *** search
/ Amiga Format CD 38 / Amiga Format CD38 (1999-03-15)(Future Publishing)(GB)(Track 1 of 3)[!][issue 1999-04].iso / -seriously_amiga- / misc / ced_html / html / html_bar.ced < prev    next >
Text File  |  1999-01-25  |  4KB  |  123 lines

  1. /*
  2. ** html_bar.ced
  3. **
  4. ** $VER: html_bar.ced 1.4 (01.03.1999)
  5. **
  6. ** Arexx script for HTML v3.2 horizontal bar
  7. **
  8. ** This script works with CygnusEd Professional v4.2
  9. **
  10. ** Copyright © Eric BELLE
  11. */
  12.  
  13. /*
  14. **------------------------------------------------------------------------------
  15. **    Initialisation
  16. **------------------------------------------------------------------------------
  17. */
  18.  
  19. OPTIONS RESULTS                            /* Tell CygnusEd to return results. */
  20. NL = '0A'X                                    /* Alias for new line. */
  21. KRETURN = RAWKEY 68                    /* Shortcut to the return key. */
  22. KTAB = RAWKEY 66                        /* Shortcut to the tab key. */
  23. STATUS TABSARESPACES                /* Return TAB mode ("tab" or "space"). */
  24. IF RESULT = 1                                /* Test the TAB mode. */
  25. THEN "TABS = SPACES"                /* Switch TAB mode from "space" to "tab". */
  26. ELSE NOP                                        /* No operation. */
  27. TAB SIZE 1                                    /* Set TAB size proportional to 2 spaces. */
  28.  
  29. /*
  30. **------------------------------------------------------------------------------
  31. **    Horizontal bar width
  32. **------------------------------------------------------------------------------
  33. */
  34.  
  35. GETSTRING "100%" '"Bar width (pixels or browser window %)?"'
  36. BarWidth = RESULT
  37.  
  38. IF (BarWidth="RESULT" | BarWidth=" ")
  39. THEN EXIT 0
  40. ELSE NOP
  41.  
  42. /*
  43. **------------------------------------------------------------------------------
  44. **    Horizontal bar height
  45. **------------------------------------------------------------------------------
  46. */
  47.  
  48. GETSTRING "2" '"Bar height in pixels (standard = 2)?"'
  49. BarHeight = RESULT
  50.  
  51. IF (BarHeight="RESULT" | BarHeight=" ")
  52. THEN EXIT 0
  53. ELSE NOP
  54.  
  55. /*
  56. **------------------------------------------------------------------------------
  57. **    Horizontal bar position
  58. **------------------------------------------------------------------------------
  59. */
  60.  
  61. BarPositionMode = "q"
  62. DO WHILE ~(BarPositionMode="l" | BarPositionMode="c" | BarPositionMode="r",
  63.                     | BarPositionMode=" " | BarPositionMode="RESULT")
  64.     GETSTRING "c" '"Bar position: (l)eft, (c)enter, (r)ight?"'
  65.     BarPositionMode = RESULT
  66. END
  67.  
  68. IF (BarPositionMode="RESULT" | BarPositionMode=" ")
  69. THEN EXIT 0
  70. ELSE NOP
  71.  
  72. /*
  73. **------------------------------------------------------------------------------
  74. **    horizontal bar shade
  75. **------------------------------------------------------------------------------
  76. */
  77.  
  78. BarShadeMode = "q"
  79. DO WHILE ~(BarShadeMode="y" | BarShadeMode="n",
  80.                     | BarShadeMode="RESULT" | BarShadeMode=" ")
  81.     GETSTRING "y" '"Bar shade mode: (y)es, (n)o?"'
  82.     BarShadeMode = RESULT
  83. END
  84.  
  85. IF (BarShadeMode="RESULT" | BarShadeMode=" ")
  86. THEN EXIT 0
  87. ELSE NOP
  88.  
  89. /*
  90. **------------------------------------------------------------------------------
  91. **    Html horizontal bar marks
  92. **------------------------------------------------------------------------------
  93. */
  94.  
  95. SELECT
  96.     WHEN (BarPositionMode="c") THEN BarPosition = ""
  97.     WHEN (BarPositionMode="r") THEN BarPosition = " ALIGN=RIGHT"
  98.     WHEN (BarPositionMode="l") THEN BarPosition = " ALIGN=LEFT"
  99.     OTHERWISE NOP
  100. END
  101.  
  102. SELECT
  103.     WHEN (BarShadeMode="y") THEN BarShade = ">"
  104.     WHEN (BarShadeMode="n") THEN BarShade = " NOSHADE>"
  105.     OTHERWISE NOP
  106. END
  107.  
  108. /*
  109. **------------------------------------------------------------------------------
  110. **    Html horizontal bar structure
  111. **------------------------------------------------------------------------------
  112. */
  113.  
  114. TEXT "<HR WIDTH=" || BarWidth || " SIZE=" || BarHeight || BarPosition || BarShade
  115.  
  116. /*
  117. **------------------------------------------------------------------------------
  118. **    End of html_bar.ced Arexx script
  119. **------------------------------------------------------------------------------
  120. */
  121.  
  122. EXIT 0
  123.